from turtle import *
from utils import *
def pole(x,size):
    getscreen().colormode(255)
    color(x,x)
    begin_fill()
    seth(90)
    fd(50*size)
    right(90)
    fd(5*size)
    right(90)
    fd(40*size)
    left(90)
    fd(42.5*size)
    left(90)
    fd(40*size)
    right(90)
    fd(5*size)
    right(90)
    fd(40*size)
    left(90)
    fd(42.5*size)
    left(90)
    fd(40*size)
    right(90)
    fd(5*size)
    right(90)
    fd(50*size)
    right(90)
    fd(100*size)
    end_fill()

def run(size=None):
    pensize(1)
    if size==None:
        size=1
    getscreen().colormode(255)
    color((46, 194, 166),(46, 194, 166))
    begin_fill()
    seth(0)
    fd(340*size)
    circle(25*size,70)
    fd(20*size)
    seth(181)
    fd(140*size)
    seth(180)
    fd(100*size)
    seth(179)
    fd(150*size)
    x=xcor()
    y=ycor()
    seth(-70)
    fd(20*size)
    circle(36*size,38)
    end_fill()

    absolute_move(x,y)
    color((35, 143, 138),(35, 143, 138))
    begin_fill()
    seth(1)
    fd(150*size)
    seth(0)
    fd(100*size)
    seth(-1)
    fd(140*size)

    seth(181)
    fd(140*size)
    seth(180)
    fd(100*size)
    seth(179)
    fd(150*size)
    end_fill()

    pu()
    seth(-1)
    fd(150*size)
    pd()
    relative_move(35*size,5*size)
    pole((32, 182, 153),size)
    relative_move(-35*size,-5*size)
    pole((48, 192, 169),size)
    
    color((36, 141, 142),(36, 141, 142))
    pu()
    seth(90)
    fd(50*size)
    pd()
    begin_fill()
    seth(180)
    circle(-10*size,180)
    fd(140*size)
    circle(-20*size,45)
    circle(-5*size,180)
    x1=xcor()
    y1=ycor()
    hd=heading()
    circle(20*size,100)
    circle(-10*size,60)
    seth(180)
    fd(110*size)
    end_fill()
    color((24, 106, 104),(24, 106, 104))
    absolute_move(x1,y1)
    seth(hd)
    begin_fill()
    circle(20*size,100)
    seth(0)
    fd(5*size)
    end_fill()